import Vue from 'vue'
import Router from 'vue-router'
import {get} from 'lodash'
import {doAuth} from '@/util/help'

Vue.use(Router)

// 路由在这里配置
const routes = [

  {
    path: '/wait',
    name: 'wait',
    component: require('../page/dev/wait').default,
    meta: {
      title: '开发中'
    }
  },
  {
    path: '/dev',
    name: 'dev',
    component: require('../page/dev/dev').default,
    meta: {
      title: '开发者使用',
      public: true
    }
  },
  {
    path: '/home',
    name: 'home',
    component: require('../page/home/home').default,
    meta: {
      title: '首页',
      public: true
    },
    children: [
      {
        path: '/staff_management',
        name: 'staff_management',
        component: require('../page/staff_management').default,
        meta: {
          title: '员工管理'
        }
      },
      {
        path: '/Organization',
        name: 'Organization',
        component: require('../page/Organization').default,
        meta: {
          title: '组织机构'
        }
      },
      {
        path: '/data_dict',
        name: 'data_dict',
        component: require('../page/data_dict').default,
        meta: {
          title: '数据字典'
        }
      },
      {
        path: '/user_management',
        name: 'user_management',
        component: require('../page/user_management').default,
        meta: {
          title: '用户管理'
        }
      },
      {
        path: '/role_authorize',
        name: 'role_authorize',
        component: require('../page/role_authorize').default,
        meta: {
          title: '角色授权'
        }
      },
      {
        path: '/AuthorizationEdit',
        name: 'AuthorizationEdit',
        component: require('../page/role_authorize/AuthorizationEdit').default,
        meta: {
          title: '授权'
        }
      },
      {
        path: '/role_management',
        name: 'role_management',
        component: require('../page/role_management').default,
        meta: {
          title: '角色管理'
        }
      },
      {
        path: '/wellFind',
        name: 'wellFind',
        component: require('../page/wellFind').default,
        meta: {
          title: '井浏览'
        }
      },
      {
        path: '/qualityAnalysis',
        name: 'qualityAnalysis',
        component: require('../page/dataAnalysis/qualityAnalysis/index').default,
        meta: {
          title: '固井质量分析'
        }
      },
      {
        path: "/datavalidate",
        name: "dataValidate",
        component: require("../page/datavalidate/index").default,
        meta: {
          title: "数据校验"
        }
      },
      {
        path: "/detailReport",
        name: "detailReport",
        component: require("../page/datavalidate/detail").default,
        meta: {
          title: "数据校验"
        }
      },
      {
        path: "/datadetail",
        name: "dataDetail",
        component: require("../page/datavalidate/dataDetail").default,
        meta: {
          title: "数据校验"
        }
      },
      {
        path: "/myinput",
        name: "myinput",
        component: require("../page/personalcenter/myinput").default,
        meta: {
          title: "我录入的数据"
        }
      },
      {
        path: "/myvalidate",
        name: "myvalidate",
        component: require("../page/personalcenter/myvalidate").default,
        meta: {
          title: "我审核的数据"
        }
      },
      {
        path: '/wellQuery',
        name: 'wellQuery',
        component: require('../page/dataQuery/wellQuery/index').default,
        meta: {
          title: '井查询'
        }
      },
      {
        path: '/wellDetail',
        name: 'wellDetail',
        component: require('../page/dataQuery/wellQuery/wellDetail').default,
        meta: {
          title: '井查询'
        }
      },
      {
        path: '/wellDetailData',
        name: 'wellDetailData',
        component: require('../page/dataQuery/wellQuery/wellDetailData').default,
        meta: {
          title: '井查询'
        }
      },
      {
        path: '/wellDetailCompare',
        name: 'wellDetailCompare',
        component: require('../page/dataQuery/wellQuery/wellDetailCompare').default,
        meta: {
          title: '井查询'
        }
      },
      {
        path: '/wellReportDetail',
        name: 'wellReportDetail',
        component: require('../page/dataQuery/wellQuery/wellReportDetail').default,
        meta: {
          title: '井查询'
        }
      },
      {
        path: '/wellManagement',
        name: 'wellManagement',
        component: require('../page/dataQuery/wellManagement/index').default,
        meta: {
          title: '井管理'
        }
      },
      {
        path: '/wellEdit',
        name: 'wellEdit',
        component: require('../page/dataQuery//wellManagement/wellEdit').default,
        meta: {
          title: '井管理'
        }
      },
      {
        path: '/workQuery',
        name: 'workQuery',
        component: require('../page/dataQuery/workQuery/index').default,
        meta: {
          title: '作业查询'
        }
      },
      {
        path: '/workNumAnalysis',
        name: 'workNumAnalysis',
        component: require('../page/dataAnalysis/workNumAnalysis/index').default,
        meta: {
          title: '作业量分析'
        }
      },{
        path: '/workWellAnalysis',
        name: 'workWellAnalysis',
        component: require('../page/dataAnalysis/workWellAnalysis/index').default,
        meta: {
          title: '作业井统计'
        }
      },{
        path: '/materialConsumptionAnalysis',
        name: 'materialConsumptionAnalysis',
        component: require('../page/dataAnalysis/materialConsumptionAnalysis/index').default,
        meta: {
          title: '材料/附件统计'
        }
      },
      // {
      //   path: '/wellAnalysis',
      //   name: 'wellAnalysis',
      //   component: require('../page/dataAnalysis/wellAnalysis/index').default,
      //   meta: {
      //     title: '作业井分析'
      //   }
      // },

      // {
      //   path: '/dashboard',
      //   name: 'dashboard',
      //   component: require('../page/dashboard/index').default,
      //   meta: {
      //     title: '仪表盘'
      //   }
      // },
      {
        path: '/data_classification',
        name: 'data_classification',
        component: require('../page/data_classification/index').default,
        meta: {
          title: '数据浏览'
        }
      },
      {
        path: '/data_documents',
        name: 'data_documents',
        component: require('../page/data_documents/index').default,
        meta: {
          title: '文件浏览'
        }
      },
      {
        path: '/dataAnalysis',
        name: 'dataAnalysis',
        component: require('../page/dataAnalysis/index').default,
        meta: {
          title: '数据统计'
        }
      },
      {
        path: '/wellAnalysis',
        name: 'wellAnalysis',
        component: require('../page/dataAnalysis/wellAnalysis/index').default,
        meta: {
          title: '井眼统计'
        }
      },
      {
        path: '/qualityAnalysis',
        name: 'qualityAnalysis',
        component: require('../page/dataAnalysis/qualityAnalysis/index').default,
        meta: {
          title: '固井质量'
        }
      },
      {
        path: '/borehole',
        name: 'borehole',
        component: require('../page/borehole/index').default,
        meta: {
          title: '井眼概述'
        }
      },
      {
        path: '/BA_WELL',
        name: 'BA_WELL',
        component: require('../page/well/well').default,
        meta: {
          title: '井眼概述测试页面'
        }
      },
      {
        path: '/BA_WELL_STRUCTURE',
        name: 'BA_WELL_STRUCTURE',
        component: require('../page/test/test').default,
        meta: {
          title: '井身结构'
        }
      },
      {
        path: '/burst-pressure',
        name: 'burst-pressure',
        component: require('../page/burst-pressure/index').default,
        meta: {
          title: '地层破裂压力'
        }
      },
      {
        path: '/pore-pressure',
        name: 'pore-pressure',
        component: require('../page/pore-pressure/index').default,
        meta: {
          title: '地层空隙压力'
        }
      },
      {
        path: '/stratum',
        name: 'stratum',
        component: require('../page/stratum/index').default,
        meta: {
          title: '地层信息'
        }
      },
      {
        path: '/test',
        name: 'STRATUM',
        component: require('../page/test/test').default,
        meta: {
          title: '地层信息测试页面'
        }
      },
      // 地层温度
      {
        path: '/BA_STRATUM_TEMPERATURE',
        name: 'BA_STRATUM_TEMPERATURE',
        component: require('../page/test/test').default,
        meta: {
          title: '地层温度'
        }
      },
      {
        path: '/dict',
        name: 'dict',
        component: require('../page/dict/index').default,
        meta: {
          title: '数据字典'
        }
      },
      {
        path: '/category',
        name: 'category',
        component: require('../page/category/index').default,
        meta: {
          title: '单位转化'
        }
      },
      {
        path: '/admin',
        name: 'admin',
        component: require('../page/category/admin').default,
        meta: {
          title: '管理员'
        }
      },
      {
        path: '/user',
        name: 'user',
        component: require('../page/user/index').default,
        meta: {
          title: '员工管理'
        }
      },
      {
        path: '/add_user',
        name: 'add_user',
        component: require('../page/user/add').default,
        meta: {
          title: '新增员工'
        }
      },
      {
        path: '/system-unit',
        name: 'system-unit',
        component: require('../page/system-unit/index').default,
        meta: {
          title: '系统单位'
        }
      },
      {
        path: '/role',
        name: 'role',
        component: require('../page/role/index').default,
        meta: {
          title: '角色管理'
        }
      },
      {
        path: '/formation-temperature',
        name: 'formation-temperature',
        component: require('../page/formation-temperature/index').default,
        meta: {
          title: '地层温度'
        }
      },
      {
        path: '/validate',
        name: 'validate',
        component: require('../page/validate/index').default,
        meta: {
          title: '数据校验'
        }
      },
      // 2020-5-2 新增路由信息
      {
        path: '/organization',
        name: 'organization',
        component: require('../page/test/test').default,
        meta: {
          title: '组织机构'
        }
      },
      {
        path: '/user',
        name: 'user',
        component: require('../page/test/test').default,
        meta: {
          title: '用户管理'
        }
      },
      {
        path: '/role',
        name: 'role',
        component: require('../page/test/test').default,
        meta: {
          title: '角色管理'
        }
      },
      {
        path: '/permission',
        name: 'permission',
        component: require('../page/test/test').default,
        meta: {
          title: '权限管理'
        }
      },
      // add new route after here

      // 基础数据 BA
      // 井筒目的层
      {
        path: '/BA_TARGETSTRATUM',
        name: 'BA_TARGETSTRATUM',
        component: require('../page/test/test').default,
        meta: {
          title: '井筒目的层'
        }
      },
      // 井身结构
      {
        path: '/BA_WELL_STRUCTURE',
        name: 'BA_WELL_STRUCTURE',
        component: require('../page/test/test').default,
        meta: {
          title: '井身结构'
        }
      },
      // 地质分层
      {
        path: '/BA_STRATUM',
        name: 'BA_STRATUM',
        component: require('../page/test/test').default,
        meta: {
          title: '地质分层'
        }
      },
      // 地质岩性
      {
        path: '/BA_STRATUM_LITHOLOGY',
        name: 'BA_STRATUM_LITHOLOGY',
        component: require('../page/test/test').default,
        meta: {
          title: '地层岩性'
        }
      },
      // 油气水层情况
      {
        path: '/BA_GAS_WATER_LAYER',
        name: 'BA_GAS_WATER_LAYER',
        component: require('../page/test/test').default,
        meta: {
          title: '油气水层情况'
        }
      },
      // 盐膏层及特殊层情况
      {
        path: '/BA_SPECIAL_STRATUM',
        name: 'BA_SPECIAL_STRATUM',
        component: require('../page/test/test').default,
        meta: {
          title: '盐膏层及特殊层情况'
        }
      },
      // 地层孔隙压力
      {
        path: '/BA_PORE_PRESSURE',
        name: 'BA_PORE_PRESSURE',
        component: require('../page/test/test').default,
        meta: {
          title: '地层孔隙压力'
        }
      },
      // 地层坍塌压力
      {
        path: '/BA_COLLAPSE_PRESSURE',
        name: 'BA_COLLAPSE_PRESSURE',
        component: require('../page/test/test').default,
        meta: {
          title: '地层坍塌压力'
        }
      },
      // 地层破裂压力
      {
        path: '/BA_FRACTURE_PRESSURE',
        name: 'BA_FRACTURE_PRESSURE',
        component: require('../page/test/test').default,
        meta: {
          title: '地层破裂压力'
        }
      },
      // 地层漏失压力
      {
        path: '/BA_LOSS_PRESSURE',
        name: 'BA_LOSS_PRESSURE',
        component: require('../page/test/test').default,
        meta: {
          title: '地层漏失压力'
        }
      },
      // 地层漏失压力
      {
        path: '/BA_LOSS_PRESSURE',
        name: 'BA_LOSS_PRESSURE',
        component: require('../page/test/test').default,
        meta: {
          title: '地层漏失压力'
        }
      },
      // 地漏实验 BA_SEA_AREA
      {
        path: '/BA_FLOOR_DRAIN',
        name: 'BA_FLOOR_DRAIN',
        component: require('../page/test/test').default,
        meta: {
          title: '地漏实验'
        }
      },
      // 海域信息
      {
        path: '/BA_SEA_AREA',
        name: 'BA_SEA_AREA',
        component: require('../page/test/test').default,
        meta: {
          title: '海域信息'
        }
      },
      // 钻井数据 DR
      // 入井钻具结构
      {
        path: '/DR_DRILL_TOOL_ASSEMBLY',
        name: 'DR_DRILL_TOOL_ASSEMBLY',
        component: require('../page/test/test').default,
        meta: {
          title: '入井钻具结构'
        }
      },
      // 钻头数据
      {
        path: '/DR_DRILL_BIT',
        name: 'DR_DRILL_BIT',
        component: require('../page/test/test').default,
        meta: {
          title: '钻头数据'
        }
      },
      // 钻井泵数据
      {
        path: '/DR_DRILLING_PUMP',
        name: 'DR_DRILLING_PUMP',
        component: require('../page/test/test').default,
        meta: {
          title: '钻井泵数据'
        }
      },
      // 井眼轨迹
      {
        path: '/DR_WELL_TRAJECTORY',
        name: 'DR_WELL_TRAJECTORY',
        component: require('../page/test/test').default,
        meta: {
          title: '井眼轨迹'
        }
      },
      // 电测井径
      {
        path: '/DR_LOGGING_DIAMETER',
        name: 'DR_LOGGING_DIAMETER',
        component: require('../page/test/test').default,
        meta: {
          title: '电测井径'
        }
      },
      // 电测温度
      {
        path: '/DR_LOGGING_TEMPERATURE',
        name: 'DR_LOGGING_TEMPERATURE',
        component: require('../page/test/test').default,
        meta: {
          title: '电测温度'
        }
      },
      // 钻井情况描述
      {
        path: '/DR_DRILLING_SITUATION',
        name: 'DR_DRILLING_SITUATION',
        component: require('../page/test/test').default,
        meta: {
          title: '钻井情况描述'
        }
      },
      // 通井情况描述
      {
        path: '/DR_DRIFTING_SITUATION',
        name: 'DR_DRIFTING_SITUATION',
        component: require('../page/test/test').default,
        meta: {
          title: '通井情况描述'
        }
      },
      // 钻遇复杂情况描述
      {
        path: '/DR_COMPLEX',
        name: 'DR_COMPLEX',
        component: require('../page/test/test').default,
        meta: {
          title: '钻遇复杂情况描述'
        }
      },
      // 随钻实测数据
      {
        path: '/DR_MEASURED_DATA',
        name: 'DR_MEASURED_DATA',
        component: require('../page/test/test').default,
        meta: {
          title: '随钻实测数据'
        }
      },
      // 钻进录井实测数据
      {
        path: '/DR_LOG_DATA',
        name: 'DR_LOG_DATA',
        component: require('../page/test/test').default,
        meta: {
          title: '钻进录井实测数据'
        }
      },
      // 钻井液设计数据
      {
        path: '/DR_FLUID_DESIGN',
        name: 'DR_FLUID_DESIGN',
        component: require('../page/test/test').default,
        meta: {
          title: '钻井液设计数据'
        }
      },
      // 钻井期间钻井液性能
      {
        path: '/DR_FLUID_PERFORMANCE',
        name: 'DR_FLUID_PERFORMANCE',
        component: require('../page/test/test').default,
        meta: {
          title: '钻井期间钻井液性能'
        }
      },
      // 固井前钻井液性能
      {
        path: '/CM_FLUID_PERFORMANCE',
        name: 'CM_FLUID_PERFORMANCE',
        component: require('../page/test/test').default,
        meta: {
          title: '固井前钻井液性能'
        }
      },
      // 固井前录井实测数据
      {
        path: '/CM_LOG_DATA',
        name: 'CM_LOG_DATA',
        component: require('../page/test/test').default,
        meta: {
          title: '固井前录井实测数据'
        }
      },
      // 水质检验
      {
        path: '/CM_WATER_TEST',
        name: 'CM_WATER_TEST',
        component: require('../page/test/test').default,
        meta: {
          title: '水质检验'
        }
      },
      // 固井基本信息
      {
        path: '/CM_BASIC',
        name: 'CM_BASIC',
        component: require('../page/test/test').default,
        meta: {
          title: '固井基本信息'
        }
      },
      // 固井流体位置
      {
        path: '/CM_FLUID_POSITION',
        name: 'CM_FLUID_POSITION',
        component: require('../page/test/test').default,
        meta: {
          title: '固井流体位置'
        }
      },
      // 冲洗液试验委托
      {
        path: '/CM_PREFLUSH_EXPERIMENT_COMMISSION',
        name: 'CM_PREFLUSH_EXPERIMENT_COMMISSION',
        component: require('../page/test/test').default,
        meta: {
          title: '冲洗液试验委托'
        }
      },
      // 冲洗液实验基本信息
      {
        path: '/CM_PREFLUSH_EXPERIMENT_BASIC',
        name: 'CM_PREFLUSH_EXPERIMENT_BASIC',
        component: require('../page/test/test').default,
        meta: {
          title: '冲洗液实验基本信息'
        }
      },
      // 冲洗液配方
      {
        path: '/CM_PREFLUSH_EXPERIMENT_FORMULA',
        name: 'CM_PREFLUSH_EXPERIMENT_FORMULA',
        component: require('../page/test/test').default,
        meta: {
          title: '冲洗液配方'
        }
      },
      // 冲洗液实验性能
      {
        path: '/CM_PREFLUSH_EXPERIMENT_PERFORMANCE',
        name: 'CM_PREFLUSH_EXPERIMENT_PERFORMANCE',
        component: require('../page/test/test').default,
        meta: {
          title: '冲洗液实验性能'
        }
      },
      // 冲洗液用量设计
      {
        path: '/CM_PREFLUSH_DOSAGE_DESIGN',
        name: 'CM_PREFLUSH_DOSAGE_DESIGN',
        component: require('../page/test/test').default,
        meta: {
          title: '冲洗液用量设计'
        }
      },
      // 冲洗液添加剂消耗计算
      {
        path: '/CM_PREFLUSH_MATERIAL_CALC',
        name: 'CM_PREFLUSH_MATERIAL_CALC',
        component: require('../page/test/test').default,
        meta: {
          title: '冲洗液添加剂消耗计算'
        }
      },
      // 隔离液化验委托
      {
        path: '/CM_DPACER_EXPERIMENT_COMMISSION',
        name: 'CM_DPACER_EXPERIMENT_COMMISSION',
        component: require('../page/test/test').default,
        meta: {
          title: '隔离液化验委托'
        }
      },
      // 隔离液实验基本信息
      {
        path: '/CM_DPACER_EXPERIMENT_BASIC',
        name: 'CM_DPACER_EXPERIMENT_BASIC',
        component: require('../page/test/test').default,
        meta: {
          title: '隔离液实验基本信息'
        }
      },
      // 隔离液实验配方
      {
        path: '/CM_DPACER_EXPERIMENT_FORMULA',
        name: 'CM_DPACER_EXPERIMENT_FORMULA',
        component: require('../page/test/test').default,
        meta: {
          title: '隔离液实验配方'
        }
      },
      // 隔离液实验性能
      {
        path: '/CM_DPACER_EXPERIMENT_PERFORMANCE',
        name: 'CM_DPACER_EXPERIMENT_PERFORMANCE',
        component: require('../page/test/test').default,
        meta: {
          title: '隔离液实验性能'
        }
      },
      // 隔离液用量计算
      {
        path: '/CM_DPACER_DOSAGE_DESIGN',
        name: 'CM_DPACER_DOSAGE_DESIGN',
        component: require('../page/test/test').default,
        meta: {
          title: '隔离液用量计算'
        }
      },
      // 隔离液添加剂消耗计算
      {
        path: '/CM_DPACER_MATERIAL_CALC',
        name: 'CM_DPACER_MATERIAL_CALC',
        component: require('../page/test/test').default,
        meta: {
          title: '隔离液添加剂消耗计算'
        }
      },
      // 水泥浆实验委托
      {
        path: '/CM_SLURRY_EXPERIMENT_COMMISSION',
        name: 'CM_SLURRY_EXPERIMENT_COMMISSION',
        component: require('../page/test/test').default,
        meta: {
          title: '水泥浆实验委托'
        }
      },
      // 水泥浆实验基本信息
      {
        path: '/CM_SLURRY_EXPERIMENT_BASIC',
        name: 'CM_SLURRY_EXPERIMENT_BASIC',
        component: require('../page/test/test').default,
        meta: {
          title: '水泥浆实验基本信息'
        }
      },
      // 水泥浆实验配方
      {
        path: '/CM_SLURRY_EXPERIMENT_FORMULA',
        name: 'CM_SLURRY_EXPERIMENT_FORMULA',
        component: require('../page/test/test').default,
        meta: {
          title: '水泥浆实验配方'
        }
      },
      // 水泥浆实验性能
      {
        path: '/CM_SLURRY_EXPERIMENT_PERFORMANCE',
        name: 'CM_SLURRY_EXPERIMENT_PERFORMANCE',
        component: require('../page/test/test').default,
        meta: {
          title: '水泥浆实验性能'
        }
      },
      // 水泥浆用量设计
      {
        path: '/CM_SLURRY_DOSAGE_DESIGN',
        name: 'CM_SLURRY_DOSAGE_DESIGN',
        component: require('../page/test/test').default,
        meta: {
          title: '水泥浆用量设计'
        }
      },
      // 水泥和外加剂消耗
      {
        path: '/CM_SLURRY_MATERIAL_CALC',
        name: 'CM_SLURRY_MATERIAL_CALC',
        component: require('../page/test/test').default,
        meta: {
          title: '水泥和外加剂消耗'
        }
      },
      // 施工时效设计
      {
        path: '/CM_WORK_EFFICIENCY_DESIGN',
        name: 'CM_WORK_EFFICIENCY_DESIGN',
        component: require('../page/test/test').default,
        meta: {
          title: '施工时效设计'
        }
      },
      // 泥浆泵顶替-录井实测数据
      {
        path: '/CM_MUDPUMP_LOG_DATA',
        name: 'CM_MUDPUMP_LOG_DATA',
        component: require('../page/test/test').default,
        meta: {
          title: '泥浆泵顶替-录井实测数据'
        }
      },
      // 套管表
      {
        path: '/CM_CASING_TABLE',
        name: 'CM_CASING_TABLE',
        component: require('../page/test/test').default,
        meta: {
          title: '套管表'
        }
      },
      // 扶正器安放位置设计
      {
        path: '/CM_CENTRALIZER_DESIGN',
        name: 'CM_CENTRALIZER_DESIGN',
        component: require('../page/test/test').default,
        meta: {
          title: '扶正器安放位置设计'
        }
      },
      // 居中度计算与摩阻计算条件
      {
        path: '/CM_CENTRICITY_FRICTION',
        name: 'CM_CENTRICITY_FRICTION',
        component: require('../page/test/test').default,
        meta: {
          title: '居中度计算与摩阻计算条件'
        }
      },
      // 套管居中分析结果
      {
        path: '/CM_CENTRICITY_RESULT',
        name: 'CM_CENTRICITY_RESULT',
        component: require('../page/test/test').default,
        meta: {
          title: '套管居中分析结果'
        }
      },
      // 大钩载荷计算结果
      {
        path: '/CM_FRICTIONDRAG_RESULT',
        name: 'CM_FRICTIONDRAG_RESULT',
        component: require('../page/test/test').default,
        meta: {
          title: '大钩载荷计算结果'
        }
      },
      // 摩阻分布计算结果
      {
        path: '/CM_FRICTION_DISTRIBUTION',
        name: 'CM_FRICTION_DISTRIBUTION',
        component: require('../page/test/test').default,
        meta: {
          title: '摩阻分布计算结果'
        }
      },
      // 套管伸长与回缩计算结果
      {
        path: '/CM_ELONGRETRACT_RESULT',
        name: 'CM_ELONGRETRACT_RESULT',
        component: require('../page/test/test').default,
        meta: {
          title: '套管伸长与回缩计算结果'
        }
      },
      // 静液柱压力计算
      {
        path: '/CM_HYDROSTATICPRESSURE',
        name: 'CM_HYDROSTATICPRESSURE',
        component: require('../page/test/test').default,
        meta: {
          title: '静液柱压力计算'
        }
      },
      // ECD计算
      {
        path: '/CM_ECD_CALC',
        name: 'CM_ECD_CALC',
        component: require('../page/test/test').default,
        meta: {
          title: 'ECD计算'
        }
      },
      // 循环温度计算
      {
        path: '/CM_CYCLE_TEMPERATURE',
        name: 'CM_CYCLE_TEMPERATURE',
        component: require('../page/test/test').default,
        meta: {
          title: '循环温度计算'
        }
      },
      // 顶替效率计算
      {
        path: '/CM_DISPLACEMENT_EFFICIENCY',
        name: 'CM_DISPLACEMENT_EFFICIENCY',
        component: require('../page/test/test').default,
        meta: {
          title: '顶替效率计算'
        }
      },
      // 流变匹配
      {
        path: '/CM_RHEOLOGICAL_MATCH',
        name: 'CM_RHEOLOGICAL_MATCH',
        component: require('../page/test/test').default,
        meta: {
          title: '流变匹配'
        }
      },
      // 固井质量总结
      {
        path: '/CM_WK_CEMENT_EVALUATION',
        name: 'CM_WK_CEMENT_EVALUATION',
        component: require('../page/test/test').default,
        meta: {
          title: '固井质量总结'
        }
      },
      // 尾管挂设计数据
      {
        path: '/CM_WK_LINERHANGER_DESIGNDATA',
        name: 'CM_WK_LINERHANGER_DESIGNDATA',
        component: require('../page/test/test').default,
        meta: {
          title: '尾管挂设计数据'
        }
      },
      // 尾管挂实际数据
      {
        path: '/CM_WK_LINERHANGER_WORKDATA',
        name: 'CM_WK_LINERHANGER_WORKDATA',
        component: require('../page/test/test').default,
        meta: {
          title: '尾管挂实际数据'
        }
      },
      // 分级箍设计数据
      {
        path: '/CM_COLLAR_DESIGN',
        name: 'CM_COLLAR_DESIGN',
        component: require('../page/test/test').default,
        meta: {
          title: '分级箍设计数据'
        }
      },
      // 分级箍实际数据
      {
        path: '/CM_COLLAR_WORK',
        name: 'CM_COLLAR_WORK',
        component: require('../page/test/test').default,
        meta: {
          title: '分级箍实际数据'
        }
      },
      // 胶塞设计数据
      {
        path: '/CM_RUBBER_PLUG_DESIGN',
        name: 'CM_RUBBER_PLUG_DESIGN',
        component: require('../page/test/test').default,
        meta: {
          title: '胶塞设计数据'
        }
      },
      // 胶塞实际数据
      {
        path: '/CM_RUBBER_PLUG_WORK',
        name: 'CM_RUBBER_PLUG_WORK',
        component: require('../page/test/test').default,
        meta: {
          title: '胶塞实际数据'
        }
      },
      // 5.25 新增
      // 添加剂消耗
      {
        path: '/CM_WORK_ADDITIVE_CONSUME',
        name: 'CM_WORK_ADDITIVE_CONSUME',
        component: require('../page/test/test').default,
        meta: {
          title: '添加剂消耗'
        }
      },
      // 施工时效
      {
        path: '/CM_WORK_EFFICIENCY',
        name: 'CM_WORK_EFFICIENCY',
        component: require('../page/test/test').default,
        meta: {
          title: '施工时效设计'
        }
      },
      // 固井质量总结
      {
        path: '/CM_CEMENT_EVALUATION',
        name: 'CM_CEMENT_EVALUATION',
        component: require('../page/test/test').default,
        meta: {
          title: '固井质量总结'
        }
      }
    ]
  },
  {
    path: '/404',
    name: '404',
    component: require('../page/404/404').default,
    meta: {
      title: '404',
      public: true
    }
  },
  {
    path: '/',
    name: 'login',
    component: require('../page/login/login').default,
    meta: {
      title: '请登录',
      public: true
    }
  },
  {
    path: '/login2',
    name: 'login2',
    component: require('../page/login/login2').default,
    meta: {
      title: '请登录',
      public: true
    }
  }
]


export const router = new Router({
  routes: routes
})

router.beforeEach((to, from, next) => {
  let isPublic = get(to, 'meta.public', false)
  if (!isPublic && !doAuth()) {
    document.title = '请登录'
    next('/')
  } else if (to.meta.title) {
    document.title = to.meta.title
  }
  next()
})
